package com.hyt.it.ogt.ykcj.service.grade.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.hyt.it.ogt.ykcj.common.utils.DateUtils;
import com.hyt.it.ogt.ykcj.domain.grade.ServantInterviewAnalysisData;
import com.hyt.it.ogt.ykcj.domain.vo.ServantInterviewAnalysisDataResp;
import com.hyt.it.ogt.ykcj.mapper.grade.ServantInterviewAnalysisDataMapper;
import com.hyt.it.ogt.ykcj.service.grade.IServantInterviewAnalysisDataService;

/**
 * 公务员考试面试分析Service业务层处理
 *
 * @author admin
 * @date 2021-10-13
 */
@Service
public class ServantInterviewAnalysisDataServiceImpl implements
    IServantInterviewAnalysisDataService {

  @Autowired
  private ServantInterviewAnalysisDataMapper servantInterviewAnalysisDataMapper;

  /**
   * 查询公务员考试面试分析
   *
   * @param id 公务员考试面试分析ID
   * @return 公务员考试面试分析
   */
  @Override
  public ServantInterviewAnalysisData selectServantInterviewAnalysisDataById(String id) {
    return servantInterviewAnalysisDataMapper.selectServantInterviewAnalysisDataById(id);
  }

  /**
   * 查询公务员考试面试分析列表
   *
   * @param servantInterviewAnalysisData 公务员考试面试分析
   * @return 公务员考试面试分析
   */
  @Override
  public List<ServantInterviewAnalysisData> selectServantInterviewAnalysisDataList(
      ServantInterviewAnalysisData servantInterviewAnalysisData) {
    return servantInterviewAnalysisDataMapper
        .selectServantInterviewAnalysisDataList(servantInterviewAnalysisData);
  }

  @Override
  public List<ServantInterviewAnalysisDataResp> getServantInterviewAnalysisData(
      ServantInterviewAnalysisData servantInterviewAnalysisData) {
    return servantInterviewAnalysisDataMapper
        .getServantInterviewAnalysisData(servantInterviewAnalysisData);
  }


  @Override
  public List<ServantInterviewAnalysisDataResp> getServantInterviewAnalysisDataByPositionTier(
      ServantInterviewAnalysisData servantInterviewAnalysisData) {
    return servantInterviewAnalysisDataMapper.getServantInterviewAnalysisDataByPositionTier(servantInterviewAnalysisData);
  }

  /**
   * 新增公务员考试面试分析
   *
   * @param servantInterviewAnalysisData 公务员考试面试分析
   * @return 结果
   */
  @Override
  public int insertServantInterviewAnalysisData(
      ServantInterviewAnalysisData servantInterviewAnalysisData) {
    servantInterviewAnalysisData.setCreateTime(DateUtils.getNowDate());
    return servantInterviewAnalysisDataMapper
        .insertServantInterviewAnalysisData(servantInterviewAnalysisData);
  }


  /**
   * 修改公务员考试面试分析
   *
   * @param servantInterviewAnalysisData 公务员考试面试分析
   * @return 结果
   */
  @Override
  public int updateServantInterviewAnalysisData(
      ServantInterviewAnalysisData servantInterviewAnalysisData) {
    servantInterviewAnalysisData.setUpdateTime(DateUtils.getNowDate());
    return servantInterviewAnalysisDataMapper
        .updateServantInterviewAnalysisData(servantInterviewAnalysisData);
  }

  /**
   * 批量删除公务员考试面试分析
   *
   * @param ids 需要删除的公务员考试面试分析ID
   * @return 结果
   */
  @Override
  public int deleteServantInterviewAnalysisDataByIds(String[] ids) {
    return servantInterviewAnalysisDataMapper.deleteServantInterviewAnalysisDataByIds(ids);
  }

  /**
   * 删除公务员考试面试分析信息
   *
   * @param id 公务员考试面试分析ID
   * @return 结果
   */
  @Override
  public int deleteServantInterviewAnalysisDataById(String id) {
    return servantInterviewAnalysisDataMapper.deleteServantInterviewAnalysisDataById(id);
  }

  @Override
  public List<ServantInterviewAnalysisDataResp> getServantInterviewAnalysisDataByZwlb(
      ServantInterviewAnalysisData queryData) {
    return servantInterviewAnalysisDataMapper.getServantInterviewAnalysisDataByZwlb(queryData);
  }
}
